package com.example.gobangssm.game;

import com.example.gobangssm.model.User;

import java.util.UUID;

//这个类就表示一个游戏房间
public class Room {
    //使用字符串类型,方便生成唯一值
    private String roomId;
    private User user1;
    private User user2;

    public Room(){
        // 构造 Room的时候生成唯一的字符串表示房间id
        //使用 UUID 来作为房间id
        roomId= UUID.randomUUID().toString();

    }

    public String getRoomId() {
        return roomId;
    }

    public void setRoomId(String roomId) {
        this.roomId = roomId;
    }

    public User getUser1() {
        return user1;
    }

    public void setUser1(User user1) {
        this.user1 = user1;
    }

    public User getUser2() {
        return user2;
    }

    public void setUser2(User user2) {
        this.user2 = user2;
    }
}
